package org.infodavid.common.model;

import java.util.Map;

import org.infodavid.common.model.behaviors.IApprovable;
import org.infodavid.common.model.behaviors.ICategorizable;
import org.infodavid.common.persistence.ICommented;
import org.infodavid.common.persistence.IDataObject;
import org.infodavid.common.persistence.INamed;

/**
 * The Interface IDocumentVersion.
 */
public interface IDocumentVersion extends IDataObject<Long>, IVersionObject, IApprovable,
    ICategorizable<IDocumentCategory>, INamed, ICommented, IGenericObject {

  /** The ATTACHMENTS. */
  String ATTACHMENTS = "attachments";

  /** The DATA. */
  String DATA = "data";

  /** The DOCUMENT_VERSION. */
  String DOCUMENT_VERSION = "documentVersion";

  /** The ENCODING. */
  String ENCODING = "encoding";

  /** The ID. */
  String ID = "documentVersionKey";

  /** The LANGUAGE. */
  String LANGUAGE = "language";

  /** The constant MAX_LENGTH_ENCODING. */
  int MAX_LENGTH_ENCODING = 32;

  /** The constant MAX_LENGTH_LANGUAGE. */
  int MAX_LENGTH_LANGUAGE = 3;

  /** The constant MAX_LENGTH_TITLE. */
  int MAX_LENGTH_TITLE = 256;

  /** The TITLE. */
  String TITLE = "title";

  /**
   * Adds the attachment.
   * @param value the value
   */
  void addAttachment(IDocument value);

  /**
   * Gets the attachments.
   * @return the attachments
   */
  Map<String,IDocument> getAttachments();

  /**
   * Gets the data.
   * @return the data
   */
  byte[] getData();

  /**
   * Removes the attachment.
   * @param value the value
   */
  void removeAttachment(IDocument value);

  /**
   * Sets the data.
   * @param values the new data
   */
  void setData(byte[] values);

  /**
   * Gets the document.
   * @return the document
   */
  IDocument getDocument();

  /**
   * Sets the document.
   * @param value the new document
   */
  void setDocument(IDocument value);

  /**
   * Gets the encoding.
   * @return the encoding
   */
  String getEncoding();

  /**
   * Gets the language.
   * @return the language
   */
  String getLanguage();

  /**
   * Gets the title.
   * @return the title
   */
  String getTitle();

  /**
   * Gets the user creator.
   * @return the user creator
   */
  IUser getUser();

  /**
   * Sets the encoding.
   * @param value the new encoding
   */
  void setEncoding(String value);

  /**
   * Sets the language.
   * @param value the new language
   */
  void setLanguage(String value);

  /**
   * Sets the title.
   * @param value the new title
   */
  void setTitle(String value);

  /**
   * Sets the user.
   * @param value the new user
   */
  void setUser(IUser value);
}
